package com.hb.medical_research_system.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hb.medical_research_system.common.Results;
import com.hb.medical_research_system.entity.Article;
import com.hb.medical_research_system.entity.Search;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
* @author hb
* @description 针对表【search】的数据库操作Service
* @createDate 2023-02-25 11:15:05
*/
public interface SearchService extends IService<Search> {

    /**
     * 添加搜索记录
     * @param search
     * @return
     */
    Results add(Search search);

    /**
     * 根据用户id查询搜索记录(分页)
     * @param userId
     * @return
     */

    Page<Search> findByUserId(Long userId, int page, int pageSize);

    /**
     * 根据用户id查询搜索记录
     * @param userId
     * @return
     */
    Results findSearchByUserId(Long userId);

}
